package com.cswangdao.mapper;

import com.cswangdao.domain.model.MarketCategory;
import com.cswangdao.domain.vo.CategoryVo;
import com.cswangdao.domain.vo.FloorGoods;
import com.cswangdao.domain.vo.LabelAndValue;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.awt.*;
import java.util.List;
@Mapper
public interface MarketCategoryMapper {
    List<CategoryVo> getByLevel(@Param("level") String level);

    List<LabelAndValue> getIdAndName(@Param("level") String level);

    void addOne(MarketCategory category);

    void updateById(MarketCategory category);

    @Delete("delete from market_category where id = #{id} ")
    void deleteById(@Param("id") Integer id);

    MarketCategory getById(Integer categoryId);

    List<MarketCategory> getAll(@Param("level") String level, @Param("limit") Integer limit);

    List<FloorGoods> getCategoryWithGoods(Integer limit);

    List<MarketCategory> getByPid(Integer pid);
}